﻿using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geometry;
using System;
using System.Runtime.InteropServices;
using ESRI.ArcGIS.Geodatabase;

namespace PlanningGIS.Framework
{
    /// <summary>
    /// 
    /// </summary>
    public interface IEditor
    {
        /// <summary>
        /// 
        /// </summary>
        EditStateChanged ChangeEditState { set; }

        /// <summary>
        /// 
        /// </summary>
        IEditTask CurrentTask { get; set; }

        /// <summary>
        /// 
        /// </summary>
        ITextElement TextElement { get; }//set; 

        /// <summary>
        /// 
        /// </summary>
        IScreenDisplay Display { get; }

        /// <summary>
        /// 
        /// </summary>
        IEnumFeature EditSelection { get; }

        /// <summary>
        /// 
        /// </summary>
        esriEditState EditState { get; }

        /// <summary>
        /// 
        /// </summary>
        IWorkspace EditWorkspace { get; }

        /// <summary>
        /// 
        /// </summary>
        IPoint Location { get; }

        /// <summary>
        /// 
        /// </summary>
        IMap Map { get; }

        /// <summary>
        /// 
        /// </summary>
        IApplication Parent { set; }

        /// <summary>
        /// 
        /// </summary>
        IWorkspace ScratchWorkspace { get; }

        /// <summary>
        /// 
        /// </summary>
        IAnchorPoint SelectionAnchor { get; }

        /// <summary>
        /// 
        /// </summary>
        int SelectionCount { get; }

        /// <summary>
        /// 
        /// </summary>
        void AbortOperation();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="point"></param>
        /// <returns></returns>
        IGeometry CreateSearchShape(IPoint point);

        //void DelayEvents(bool delay);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="enabled"></param>
        void EnableUndoRedo(bool enabled);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        IEditTask get_Task(int index);
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        bool HasEdits();
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        bool HasUndos();
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        bool HasRedos();

        //void InvertAgent(IPoint loc, int hdc);
        /// <summary>
        /// 
        /// </summary>
        void RedoOperation();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="point"></param>
        /// <returns></returns>
        IEnumFeature SearchSelection(IPoint point);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="workspace"></param>
        void StartEditing(IWorkspace workspace);
        /// <summary>
        /// 
        /// </summary>
        void SaveEditing();
        /// <summary>
        /// 
        /// </summary>
        void StartOperation();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="saveChanges"></param>
        void StopEditing(bool saveChanges);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="menuText"></param>
        void StopOperation(string menuText);
        /// <summary>
        /// 
        /// </summary>
        void UndoOperation();
    }
}
